import request from '@/utils/request'

/**
 * 音乐风格接口
 */
const musicStylesApi = {
    /**
     * 音乐风格列表
     */
    lists(params: {
        page_no?: number;
        page_size?: number;
        name?: string;
        is_delete?: number;
        start_time?: string;
        end_time?: string;
    }): Promise<any> {
        return request.get({
            url: '/apply/music/styles/lists',
            params
        })
    },

    /**
     * 音乐风格新增
     */
    add(params: {
        name: string;
        value: string;
        sort: number;
        is_disable: number;
    }): Promise<any> {
        return request.post({
            url: '/apply/music/styles/add',
            params
        })
    },

    /**
     * 音乐风格编辑
     */
    edit(params: {
        id: number;
        name: string;
        value: string;
        sort: number;
        is_disable: number;
    }): Promise<any> {
        return request.post({
            url: '/apply/music/styles/edit',
            params
        })
    },

    /**
     * 音乐风格删除
     */
    delete(params: {
        id: number;
    }): Promise<any> {
        return request.post({
            url: '/apply/music/styles/delete',
            params
        })
    }
}

export default musicStylesApi
